package com.enniswu.weitter.setting;

import android.content.Intent;
import android.os.Bundle;

import com.enniswu.weitter.R;
import com.enniswu.weitter.base.BaseActivity;
import com.enniswu.weitter.data.local.SPSupport;
import com.enniswu.weitter.entity.User;
import com.enniswu.weitter.setting.language.LanguageActivity;
import com.enniswu.weitter.setting.theme.ThemeActivity;

import org.greenrobot.eventbus.EventBus;

import butterknife.OnClick;

public class SettingActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        setTitle(R.string.info_bt_b_setting);
    }

    @OnClick(R.id.itv_account)
    public void onItvAccountClicked() {
    }

    @OnClick(R.id.itv_theme)
    public void onItvThemeClicked() {
        startActivity(new Intent(SettingActivity.this, ThemeActivity.class));
    }

    @OnClick(R.id.itv_language)
    public void onItvLanguageClicked() {
        startActivity(new Intent(SettingActivity.this, LanguageActivity.class));
    }

    @OnClick(R.id.tiv_cache)
    public void onTivCacheClicked() {
    }

    @OnClick(R.id.tiv_about)
    public void onTivAboutClicked() {
    }

    @OnClick(R.id.tiv_logout)
    public void onViewClicked() {
        EventBus.getDefault().post(new User());
        SPSupport.getInstance().putSessionId(null);
        finish();
    }
}
